import { Render } from "#fansky";

export class Help extends plugin {
    constructor() {
        super({
            name: 'FanSky_Qs插件帮助',
            dsc: 'FanSky_Qs插件帮助',
            event: 'message',
            priority: 3000,
            rule: [
                {
                    fnc: 'help',
                    reg: /^#?([Ff]an((Ss)?ky)?)(帮助|菜单|help|功能)$/
                }
            ]
        })
    }

    async help(e) {
        const data = await helpData()
        return Render.render(e, 'help/help', data)
    }
}

async function helpData() {
    return {
        logo: 'help/icon/Logo.png',
        helpData: [{
            group: "原神数据：[非小酋、提瓦特小助手]",
            list: [
                {
                    "icon": "help/icon/队伍伤害.png",
                    "title": "#队伍伤害xx...",
                    "desc": "#队伍伤害uid xx..."
                }, {
                    "icon": "help/icon/队伍伤害.png",
                    "title": "#极限队伍伤害xx...",
                    "desc": "#极限队伍伤害uid xx..."
                }, {
                    "icon": "help/icon/排行榜.png",
                    "title": "#宝箱排行 #成就排行",
                    "desc": "官 & B服宝箱、成就排行"
                }, {
                    "icon": "help/icon/排行榜.png",
                    "title": "#宝箱排行榜 #成就排行榜",
                    "desc": "群内宝箱、成就排行榜"
                }
            ]
        }]
    }
}
